package S13.second;

import java.util.HashMap;
import java.util.Map;

public class S01 {

	public static void main(String[] args) {
		Map<String, String>map=new HashMap<String, String>();
		map.put("one", "一个");
		String zh = map.get("one");
		System.out.println(zh);
		
		zh = map.get("two");
		System.out.println(zh);
		System.out.println("----------------------");
		System.out.println(map.size());
		System.out.println("----------------------");
		zh=map.computeIfAbsent("one", k->"未找到");
		System.out.println(zh);
		
		zh=map.computeIfAbsent("two", k->"两个");
		System.out.println(zh);
		System.out.println("----------------------");
		System.out.println(map.size());
	}

}
